<?php

namespace app\utils;

use yii;

class SettingUtils {

    public static function get($name, $default = NULL) {
        return Yii::$app->get('setting')->get($name, $default);
    }

    public static function getTemplate($name, $vars, $params) {
        $value = Yii::$app->get('setting')->get($name, '');
        if (empty($value)) {
            return $value;
        }
        return str_replace($vars, $params, $value);
    }
}